package com.my.study.design.rule.support;

import java.util.Optional;

/**
 * @author: yidujun
 * @create: 2021/07/12 09:52
 */
public class NameConditionRule extends AbstractConditionRule<String> {

    @Override
    public String convert(Object obj) {
        return Optional.ofNullable(obj).orElse("").toString();
    }

    @Override
    public boolean judge(String obj) {
        if ("ydj".equals(obj)) {
            return true;
        }
        return false;
    }
}
